package com.atguigu07.object.equals.exer1;

/**
 * ClassName: OrderTest
 * Package: com.atguigu07.object.equals.exer1
 * Description:
 *
 * @Author xiao_qi
 * @Create 2024/9/2 16:08
 * @Version 1.0
 */
public class OrderTest {
    public static void main(String[] args) {
        Order o1 = new Order("小王",17);
        Order o2 = new Order("小王",17);
        System.out.println(o1.equals(o2));

        Order order3 = new Order(new String("orderBB"),1002);
        Order order4 = new Order(new String("orderBB"),1002);
        System.out.println(order3.equals(order4));

        String str1 = "AA";
        String str2 = "AA";
        System.out.println(str1 == str2);//true
    }
}
